//
//  @ Project : Project1
//  @ File Name : Monster.java
//  @ Date : 1/21/2013
//  @ Author : Graham Tapscott
//
//



/**
 * Monster - this class represents a non-human, non-player type.  It is derived from the Creature class. 
 * @author gtapscott
 *
 */
public class Monster extends Creature {
	private String color = "";
	public Monster() {
		super();
	}
	
	public String getColor() {
		return color;
	}
	
	public void setColor(String c) {
		color = c;
	}
	
	public Monster(String[] input) {
		this();
		deSerialize(input);
	}
	
	public String toString() {
		String mobile = "c:" + this.index + ":" + this.type + ":" + this.name + ":"
				+ this.partyIndex + ":" + this.empathy + ":" + this.fear + ":"
				+ this.carryCapacity + ":" + this.color;
		
		return mobile;
	}
	
	public void deSerialize(String[] mobile) {
		this.index = Integer.parseInt(mobile[1].trim());
		this.type = mobile[2].trim();
		this.name = mobile[3].trim();
		this.partyIndex = Integer.parseInt(mobile[4].trim());
		this.empathy = Integer.parseInt(mobile[5].trim());
		this.fear = Integer.parseInt(mobile[6].trim());
		this.carryCapacity = Double.parseDouble(mobile[7].trim());			
	}
}
